package com.systop.service.impl;

import com.systop.entity.Banner;
import com.systop.dao.BannerDao;
import com.systop.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BannerServiceImpl implements BannerService {
    @Autowired
    private BannerDao bannerDao;

    //查询符合条件图片信息
    @Override
    public List<Banner> findAllImg(Banner banner) {
        return bannerDao.findAllImg(banner);
    }
    //查询符合条件图片数量
    public int countImg(Banner banner){
        return bannerDao.countImg(banner);
    };
    //查询符合条件图片
    public List<Banner> findAllImg1(Banner banner){
        return bannerDao.findAllImg1(banner);
    };

    //添加banner数据
    public int addImg(Banner banner){
        return bannerDao.addImg(banner);
    };

    //根据id删除数据
    public int delBanner(Banner banner){
        return bannerDao.delBanner(banner);
    };

    //更新数据方法
    public int udpBanner(Banner banner){
        return bannerDao.udpBanner(banner);
    };
}
